

using System;
using System.Text;

using NHibernate;
using NHibernate.Cfg;
using NHibernate.Criterion;
using NHibernate.Exceptions;

using SpotifyGenNHibernate.EN.Spotify;
using SpotifyGenNHibernate.CAD.Spotify;

namespace SpotifyGenNHibernate.CEN.Spotify
{
        public partial class BandejaDeEntradaCEN
        {
        private IBandejaDeEntradaCAD _IBandejaDeEntradaCAD;

        public BandejaDeEntradaCEN(IBandejaDeEntradaCAD _IBandejaDeEntradaCAD)
        {
                this._IBandejaDeEntradaCAD = _IBandejaDeEntradaCAD;
        }

        public int New_ (int p_usuario)
        {
                BandejaDeEntradaEN bandejaDeEntradaEN = null;
                int oid;

                //Initialized BandejaDeEntradaEN
                bandejaDeEntradaEN = new BandejaDeEntradaEN ();
                if (p_usuario != -1) {
                        bandejaDeEntradaEN.Usuario = new SpotifyGenNHibernate.EN.Spotify.UsuarioEN ();
                        bandejaDeEntradaEN.Usuario.Id = p_usuario;
                }
                //Call to BandejaDeEntradaCAD

                oid = _IBandejaDeEntradaCAD.New_ (bandejaDeEntradaEN);
                return oid;
        }

        public void Destroy (int id)
        {
                _IBandejaDeEntradaCAD.Destroy (
                        id

                        );
        }

        public System.Collections.Generic.IList<BandejaDeEntradaEN> Consultar (int first, int size)
        {
                System.Collections.Generic.IList<BandejaDeEntradaEN> list = null;

                list = _IBandejaDeEntradaCAD.Consultar (first, size);
                return list;
        }
        }
}
